package com.big.app.service.impl;

import com.big.app.dao.CheatDao;
import com.big.app.entity.Cheats;
import com.big.app.service.intf.CheatsService;
import com.big.app.vo1.R;

import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class CheatsImpl implements CheatsService {
    @Resource
    private CheatDao dao;
    @Override
    public R all(String cheaturl) {
        System.out.println(dao.selectlist(cheaturl));
        return new R(200,"ok",dao.selectlist(cheaturl));
    }

    @Override
    public R insert(Cheats cheats) {
        cheats.setUser("123");
        cheats.setLujing("http://kqoss.oss-cn-beijing.aliyuncs.com/tp5.jpg?Expires=1744984789&OSSAccessKeyId=LTAI5t6DuENqcjTYDCsppyGg&Signature=%2F12Om4fTOoG8dirW%2FqU6%2BDQr%2Bp4%3D");

        int i = dao.insert(cheats);
        if (i==1){
            return new R(200,"ok",null);
        }else {
            return new R(400,"false",null);
        }
    }
}
